<?php
/**
 * Larfree Api类
 * @author blues
 */
namespace App\Http\Controllers\Admin\Express;

use Illuminate\Http\Request;
use Larfree\Controllers\AdminApisController as Controller;
use App\Models\Express\ExpressNews;
class NewsController extends Controller
{
    public function __construct(ExpressNews $model )
    {
        $this->model = $model;
        parent::__construct();
    }

    public  function index(Request $request)
    {
         if(isset($request->type)){
             if($request->type=='5'||$request->type=='6'){
                 $this->model=$this->model->limit(6)->orderBy('created_at','desc');
             }
         }

        return parent::index($request); // TODO: Change the autogenerated stub
    }
}